package com.paiai.lslease.dao.apphouse;

import com.ibatis.sqlmap.client.SqlMapClient;

import java.sql.SQLException;
import java.util.List;

public class AppTenantInfoDAOImpl implements AppTenantInfoDAO {

    private SqlMapClient sqlMapClient;

    public AppTenantInfoDAOImpl(SqlMapClient sqlMapClient) {
        super();
        this.sqlMapClient = sqlMapClient;
    }

    public List<Integer> getTenantAllHouseId(int tenantId) throws SQLException {
        return sqlMapClient.queryForList("app_tenant_lock_info.selectTenantAllHouseId", tenantId);
    }

    public int selectNeweastAppLockId() throws SQLException {
        return (Integer) sqlMapClient.queryForObject("app_tenant_lock_info.selectNeweastAppLockId");
    }
}
